﻿<?php
session_start();
if ($_session['user_guid'] == "" || $_session['user_guid'] == null)
{
	//header("Location:login.php");
}
require_once '../bin/DBA/DB.class.php';
require_once '../bin/DAL/ContactDAL.php';
require_once '../bin/BLL/ContactBLL.php';
require_once '../bin/DAL/RegardingDAL.php';
require_once '../bin/BLL/RegardingBLL.php';
//中文绑定
$chs_reginfo = RegardingBLL::GetItemByChs_Regarding();
//英文绑定
$eng_reginfo = RegardingBLL::GetItemByEng_Regarding();
//德文绑定
$deu_reginfo = RegardingBLL::GetItemByDeu_Regarding();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>无标题页</title>
    <link href="../Files/Css/formpost.css" rel="stylesheet" charset="utf-8" type="text/css" />
    <link href="../Files/Css/products.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="../Tools/tinymce/tinymce/tiny_mce.js"></script>

    <script language="javascript" type="text/javascript" src="../Tools/tinymce/editer.js"></script>

    <script type="text/javascript" src="../Files/Javascript/jquery.js"></script>

    <script type="text/javascript">
    //<![CDATA[
    $(function(){
            //����Ǳ���ģ���Ӻ��Ǳ�ʶ.
            $("form :input.required").each(function(){
                var $required = $("<strong class='high'> *</strong>"); //����Ԫ��
                $(this).parent().append($required); //Ȼ����׷�ӵ��ĵ���
            });
             //�ı���ʧȥ�����
            $('form :input').blur(function(){
                 var $parent = $(this).parent();
                 $parent.find(".formtips").remove();
                 //��֤����
                 if( $(this).is('#act_chscontent') ){
                    if( this.val()=="" ){
                        var errorMsg = '请输入公司介绍.';
                        $parent.append('<span class="formtips onError">'+errorMsg+'</span>');
                    }else{
                        var okMsg = '输入正确.';
                        $parent.append('<span class="formtips onSuccess">'+okMsg+'</span>');
                    }
                 }
                 //��֤�����ַ
                 if( $(this).is('#act_engcontent') ){
                    if( this.val()=="" ){
                          var errorMsg = '请输入公司介绍.';
                          $parent.append('<span class="formtips onError">'+errorMsg+'</span>');
                    }else{
                          var okMsg = '输入正确.';
                          $parent.append('<span class="formtips onSuccess">'+okMsg+'</span>');
                    }
                 }
                 //��֤��������
                 if( $(this).is('#act_deucontent') ){
                    if( this.val()==""){
                          var errorMsg = '请输入公司介绍.';
                          $parent.append('<span class="formtips onError">'+errorMsg+'</span>');
                    }else{
                          var okMsg = '输入正确.';
                          $parent.append('<span class="formtips onSuccess">'+okMsg+'</span>');
                    }
                 }
            }).keyup(function(){
               $(this).triggerHandler("blur");
            }).focus(function(){
                 $(this).triggerHandler("blur");
            });//end blur

            
            //�ύ��������֤��
             $('#dosubmit').click(function(){
                    $("form :input.required").trigger('blur');
                    var numError = $('form .onError').length;
                    if(numError){
                        return false;
                    }
             });
    })
    //]]>
    </script>

</head>
<body>
    <form id="form1" method="post" action="ModRegarding.server.php">
    <div>
        <table width="75%">
            <tr>
                <td>
                    <h3>
                        公司介绍</h3>
                    <hr />
                </td>
            </tr>
            <tr>
                <td align="center">
                    中文
                </td>
            </tr>
            <tr>
                <td align="center">

                    <script type="text/javascript">Cediter("act_chscontent")</script>

                    <textarea id="act_chscontent" name="act_chscontent" style="width: 600px; height: 350px;"
                        class="required"><?php echo $chs_reginfo["content"] ?></textarea>
                </td>
            </tr>
	    <tr>
		<td>
		<hr />
		</td>
	    </tr>
            <tr>
                <td align="center">
                    英文
                </td>
            </tr>
            <tr>
                <td align="center">

                    <script type="text/javascript">Cediter("act_engcontent")</script>

                    <textarea id="act_engcontent" name="act_engcontent" style="width: 600px; height: 350px;"
                        class="required"><?php echo $eng_reginfo["content"] ?></textarea>
                </td>
            </tr>
	     <tr>
		<td>
		<hr />
		</td>
	    </tr>
            <tr>
                <td align="center">
                    德文
                </td>
            </tr>
            <tr>
                <td align="center">

                    <script type="text/javascript">Cediter("act_deucontent")</script>

                    <textarea id="act_deucontent" name="act_deucontent" style="width: 600px; height: 350px;"
                        class="required"><?php echo $deu_reginfo["content"] ?></textarea>
                    <input name="ipt_guid" id="ipt_guid" type="hidden" value="<?php echo $chs_reginfo["guid"]?>">
                </td>
            </tr>
            <tr>
                <td align="center">
                    <input id="dosubmit" type="submit" value="提交数据" />
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
